Package-level declarations

Types

Link copied to clipboard

A marker interface for units of time that are equivalent to or smaller than a day.

Link copied to clipboard

A marker interface for units of time that are equivalent to or smaller than a hour.

Link copied to clipboard

A marker interface for units of time that are equivalent to or smaller than a minute.

Link copied to clipboard

A marker interface for units of time that are equivalent to or smaller than a month.

Link copied to clipboard

A marker interface for units of time that are equivalent to or smaller than a nanosecond.

Link copied to clipboard

The relationship between two calendar values.

Link copied to clipboard

A marker interface for units of time that are equivalent to or smaller than a second.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed class TimeUnit
Link copied to clipboard
interface YearOrSmaller

A marker interface for units of time that are equivalent to or smaller than a year.

Functions

Link copied to clipboard

Create a new TimePeriod by moving forward some number of days.

Link copied to clipboard

Create a new TimePeriod by moving forward some number of hours.

Link copied to clipboard

Create a new TimePeriod by moving forward some number of minutes.

Link copied to clipboard

Create a new TimePeriod by moving forward some number of months.

Link copied to clipboard

Create a new TimePeriod by moving forward some number of nanoseconds.

Link copied to clipboard

Create a new TimePeriod by moving forward some number of seconds.

Link copied to clipboard

Create a new TimePeriod by moving forward some number of years.

Link copied to clipboard
fun TimePeriod<*>.after(other: TimePeriod<*>): Boolean
Link copied to clipboard
fun TimePeriod<*>.before(other: TimePeriod<*>): Boolean
Link copied to clipboard
Link copied to clipboard

Construct a new TimePeriod by converting the receiver to a new TimeZone.

Link copied to clipboard
fun LocalDate.dayPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Day>
fun LocalDateTime.dayPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Day>
Link copied to clipboard
fun TimePeriod<*>.during(other: TimePeriod<*>): Boolean
Link copied to clipboard
fun LocalDateTime.hourPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Hour>
Link copied to clipboard
operator fun <Unit : TimeUnit> TimePeriod<Unit>.minus(difference: TimeDifference<Unit>): TimePeriod<Unit>

Subtracts a TimeDifference from this TimePeriod.

Link copied to clipboard
fun LocalDateTime.minutePeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Minute>
Link copied to clipboard
fun LocalDate.monthPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Month>
fun LocalDateTime.monthPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Month>
Link copied to clipboard
fun Clock.nextDay(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Day>
Link copied to clipboard
fun Clock.nextHour(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Hour>
Link copied to clipboard
fun Clock.nextMinute(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Minute>
Link copied to clipboard
fun Clock.nextMonth(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Month>
Link copied to clipboard
fun Clock.nextSecond(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Second>
Link copied to clipboard
fun Clock.nextYear(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Year>
Link copied to clipboard

fun Clock.offset(delta: Duration): Clock

Offset a Clock.

Link copied to clipboard
Link copied to clipboard
operator fun <Unit : TimeUnit> TimePeriod<Unit>.plus(difference: TimeDifference<Unit>): TimePeriod<Unit>

Adds a TimeDifference to this TimePeriod.

Link copied to clipboard
fun Clock.previousDay(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Day>
Link copied to clipboard
fun Clock.previousHour(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Hour>
Link copied to clipboard
fun Clock.previousMinute(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Minute>
Link copied to clipboard
fun Clock.previousMonth(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Month>
Link copied to clipboard
fun Clock.previousSecond(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Second>
Link copied to clipboard
fun Clock.previousYear(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Year>
Link copied to clipboard
Link copied to clipboard
fun Clock.scaled(factor: Double): Clock

Scale a Clock.

Link copied to clipboard
fun LocalDateTime.secondPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Second>
Link copied to clipboard

Create a new TimePeriod by moving backward some number of days.

Link copied to clipboard

Create a new TimePeriod by moving backward some number of hours.

Link copied to clipboard

Create a new TimePeriod by moving backward some number of minutes.

Link copied to clipboard

Create a new TimePeriod by moving backward some number of months.

Link copied to clipboard

Create a new TimePeriod by moving backward some number of nanoseconds.

Link copied to clipboard

Create a new TimePeriod by moving backward some number of seconds.

Link copied to clipboard

Create a new TimePeriod by moving backward some number of years.

Link copied to clipboard
fun Clock.thisDay(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Day>

Retrieve the current day of the Clock and TimeZone.

Link copied to clipboard
fun Clock.thisHour(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Hour>

Retrieve the current hour of the Clock and TimeZone.

Link copied to clipboard
fun Clock.thisInstant(): Instant
Link copied to clipboard
fun Clock.thisMinute(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Minute>

Retrieve the current minute of the Clock and TimeZone.

Link copied to clipboard
fun Clock.thisMonth(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Month>

Retrieve the current month of the Clock and TimeZone.

Link copied to clipboard
fun Clock.thisNanosecond(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Nanosecond>

Retrieve the current nanosecond of the Clock and TimeZone.

Link copied to clipboard
fun Clock.thisSecond(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Second>

Retrieve the current second of the Clock and TimeZone.

Link copied to clipboard
fun Clock.thisYear(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Year>

Retrieve the current year of the Clock and TimeZone.

Link copied to clipboard
fun Clock.today(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Day>

Retrieve the current day of the Clock and TimeZone.

Link copied to clipboard

Constructs a kotlinx.datetime.LocalDate from a TimePeriod with Day or finer precision.

Link copied to clipboard

Constructs a kotlinx.datetime.LocalDateTime from a TimePeriod with Hour or smaller precision.

Link copied to clipboard
fun Clock.tomorrow(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Day>
Link copied to clipboard
fun LocalDate.yearPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Year>
fun LocalDateTime.yearPeriod(timeZone: TimeZone): TimePeriod<TimeUnit.Year>
Link copied to clipboard
fun Clock.yesterday(timeZone: TimeZone = TimeZone.currentSystemDefault()): TimePeriod<TimeUnit.Day>

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Create a new TimePeriod by moving forward one day.

Link copied to clipboard

Create a new TimePeriod by moving forward one hour.

Link copied to clipboard

Create a new TimePeriod by moving forward one minute.

Link copied to clipboard

Create a new TimePeriod by moving forward one month.

Link copied to clipboard

Create a new TimePeriod by moving forward one nanosecond.

Link copied to clipboard

Create a new TimePeriod by moving forward one second.

Link copied to clipboard

Create a new TimePeriod by moving forward one year.

Link copied to clipboard

Create a new TimePeriod by moving backward one day.

Link copied to clipboard

Create a new TimePeriod by moving backward one hour.

Link copied to clipboard

Create a new TimePeriod by moving backward one minute.

Link copied to clipboard

Create a new TimePeriod by moving backward one month.

Link copied to clipboard

Create a new TimePeriod by moving backward one nanosecond.

Link copied to clipboard

Create a new TimePeriod by moving backward one second.

Link copied to clipboard

Create a new TimePeriod by moving backward one year.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard